@layout("/backend/common/_container.html"){


<input type="hidden" id="dataSourceMap" name="dataSourceMap" value='${dataSourceMap!}'>

<input type="hidden" id="ruleMap" name="ruleMap" value='${ruleMap!}'>

<style>
	.table th, .table td {
		text-align: center;
		vertical-align: middle !important;
	}
</style>
<div class="dhcc-form">

	<form method='post' id="RuleInfoForm" name="RuleInfoForm" enctype="multipart/form-data">

		<input type="hidden" id="id" name="id" value="${contraindicationItemRule.id}">

		<div class="form-group has-feedback">
			<label class="lab">规则代码</label>
			<div class="ele">
				<input class="textbox" id="expCode" name="expCode" style="width: 600px" onchange="RuleInfoDlg.codechange()">
				<span  style="color: red;  " id="codeRepeatErr">规则代码不能重复</span>
			</div>
		</div>
		<div class="form-group has-feedback">
			<label class="lab">规则描述</label>
			<div class="ele">
				<input class="textbox" id="ruleDesc" name="ruleDesc"  style="width: 600px">
			</div>
		</div>
		<div class="form-group has-feedback">
			<label class="lab">备注</label>
			<div class="ele">
				<input class="textbox" id="ruleMemo" name="ruleMemo" style="width: 600px" >
			</div>
		</div>
		<div class="form-group has-feedback">
			<label class="lab">计算类型</label>
			<div class="ele">
				<input class="hisui-combobox textbox" id="ruleType" name="ruleType" style="width: 600px"  >
			</div>
		</div>
		<div class="form-group has-feedback">
			<label class="lab">默认值</label>
			<div class="ele">
				<input class="hisui-combobox textbox" id="defaultValue" name="defaultValue" style="width: 600px"   >
			</div>
		</div>

		<div style="height:10%;">
			<span>规则运算</span>
		</div>

		<div class="col-sm-10">
			<table class="table table-bordered">
				<thead>
				<tr>
					<th width="120px">数据源</th>
					<th width="120px">取值字段</th>
					<th width="80px">传参</th>
					<th width="90px">运算</th>
					<th width="120px">数据源</th>
					<th width="120px">取值字段</th>
					<th width="80px">传参</th>
					<th width="90px">运算</th>
				</tr>
				</thead>
				<tbody>
				<tr>
					<td>
						<select class="hisui-combobox textbox" id="dataSource1" name="dataSource1" style="width: 100px"
								data-options="editable:false,multiple:false,allowNull:true,selectOnNavigation:false,onSelect:RuleInfoDlg.sourceChange1">
							@for (dataSource in dataSourceMap) {
							<option value="${dataSource.key}">${dataSource.value}</option>
							@}
						</select>
					</td>
					<td>
						<select class="hisui-combobox textbox" id="dataSourceItem1" name="dataSourceItem1"
								style="width: 100px"
								data-options="editable:false,multiple:false,panelHeight:'100',selectOnNavigation:false">
						</select>
					</td>
					<td>
						<input class="textbox" type="text" style="width: 60px" name="param1" id="param1"  >
					</td>
					<td>
						<input class="textbox" type="text" style="width: 60px" name="operator1" id="operator1"  >
					</td>
					<td>
						<select class="hisui-combobox textbox" id="dataSource2" name="dataSource2" style="width: 100px"
								data-options="editable:false,multiple:false,allowNull:true,selectOnNavigation:false,onSelect:RuleInfoDlg.sourceChange2">
							@for (dataSource in dataSourceMap) {
							<option value="${dataSource.key}">${dataSource.value}</option>
							@}
						</select>
					</td>
					<td>
						<select class="hisui-combobox textbox" id="dataSourceItem2" name="dataSourceItem2"
								style="width: 100px"
								data-options="editable:false,multiple:false,panelHeight:'100',selectOnNavigation:false">

						</select>
					</td>
					<td>
						<input class="textbox" type="text" style="width: 60px" name="param2" id="param2" >
					</td>
					<td>
						<input class="textbox" type="text" style="width: 60px" name="operator2" id="operator2"  >
					</td>
				</tr>
				</tbody>
			</table>
		</div>

		<div class="toolbar">
			<#Button name="保存" id="ensure" icon="icon-w-save" clickFun="RuleInfoDlg.addSubmit()"/>
			<#Button btnCss="l-bt-red" name="关闭" id="cancel" icon="icon-w-close" clickFun="RuleInfoDlg.close()"/>
		</div>

	</form>
</div>

<script src="${ctxPath}/static/backend/sdc/contraindicationitemrule/contraindicationitemrule_info.js"></script>
@}
